﻿using System;
using System.Collections;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
using FmcWebsite.Web;

namespace Cms
{
    /// <summary>
    /// Summary description for $codebehindclassname$
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    public class audio : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            int id = int.Parse(context.Request.Params["id"]);

            WebAttachmentAudio aud = WebAttachmentAudio.ById(id, context.Session);

            context.Response.ContentType = aud.ContentType;
            aud.Save(context.Response.OutputStream);        
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}
